import request from '@/utils/request'

// 查询部门信息列表
export function listDeptment(query) {
  return request({
    url: '/system/deptment/list',
    method: 'get',
    params: query
  })
}

// 查询部门信息详细
export function getDeptment(deptId) {
  return request({
    url: '/system/deptment/' + deptId,
    method: 'get'
  })
}

// 新增部门信息
export function addDeptment(data) {
  return request({
    url: '/system/deptment',
    method: 'post',
    data: data
  })
}

// 修改部门信息
export function updateDeptment(data) {
  return request({
    url: '/system/deptment',
    method: 'put',
    data: data
  })
}

// 删除部门信息
export function delDeptment(deptId) {
  return request({
    url: '/system/deptment/' + deptId,
    method: 'delete'
  })
}
